---
title: Retrieve and redact "my tasks"
summary: Return a user's personal task list with confidentiality masking applied.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-08-21
library: SAIF.Business.Tasks.Claim
reference_type: embedded
operation_id: OP-6
trigger: User opens their personal task list
---

# Retrieve and redact "my tasks"

Retrieves a per-mailid task list, resolves confidentiality access once per retrieval, and redacts worker names on flagged claims for unauthorized users.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-6 |
| **Trigger** | User opens their personal task list |
| **Inputs** | `MyTaskCriteria` |
| **Outputs** | Sorted, access-filtered `clsClaimTask` list |
| **Primary components** | `clsMyTaskCollection.GetTasks`, `clsMyTaskCollection.AfterRetrieve` |
| **Entry point** | `SAIF.Business.Tasks.Claim/clsMyTaskCollection.vb` |

## Steps

1. `GetTasks` assigns the DPI and adds `TaskSourceSystem.Claims` to the criteria, then calls `RetrieveObject`.
2. `AfterRetrieve` resolves four access rights once: `ClaimServices.HasExposureAccess(True)`, `HasConflictAccess(True)`, `HasCollateralAccess(True)`, `HasSecureAccess(True)`.
3. For each reader row: wrap in `clsSAIFDataReader`, read `TaskSourceCode`; construct a task via `NewTask()`.
   - On failure: if the constructed task is `Nothing`, throw `ApplicationException` naming the unsupported source system ([BR-MY-03](../business-rules.md#br-my-03-unsupported-task-source-system-cannot-be-loaded)).
4. Otherwise call `Task.LoadAfterSort(dpi, reader)` (public wrapper over the protected `Load`, executing [SQL-001](../sql/SQL-001-select-additional-fields.md) via [Enrich a loaded claim task](op-3-enrich-loaded-claim-task.md)), assign the grouping sort key via `setSortOrder`.

   > **Origin**: Step 4's sort-key assignment is [Assign the claim-grouped sort key](op-7-assign-claim-grouped-sort-key.md).
5. Apply [BR-MY-01](../business-rules.md#br-my-01-confidential-worker-name-redaction): if the task is flagged exposure / health issue / hostile worker / worker conflict and the user lacks the matching access, overwrite `WorkerName` with `"Confidential"`.
6. After the loop, call `SortByDefault()` — `sortBy`, then `TaskDate`, then `ClaimNum` ([BR-MY-02](../business-rules.md#br-my-02-urgent-claims-grouped-ahead-in-my-tasks-sort)).
   - Redaction is silent (no message to the user).

## Process flow

```mermaid
flowchart TD
	Start([User opens my tasks]) --> S1["GetTasks: assign DPI,<br>RetrieveObject"]
	S1 --> S2[Resolve 4 access rights once]
	S2 --> Loop{For each row}
	Loop --> S3[Construct task via NewTask]
	S3 --> Check{NewTask returns Nothing?}
	Check -->|Yes| Err([ApplicationException])
	Check -->|No| S4["LoadAfterSort, assign sort<br>key"]
	S4 --> S5{Flagged and unauthorized?}
	S5 -->|Yes| Redact["Set WorkerName =<br>Confidential"]
	S5 -->|No| Loop
	Redact --> Loop
	Loop -->|Done| S6[SortByDefault]
	S6 --> EndOk([Sorted, redacted task list])
```

## Failure and edge-case behavior
- Unsupported task source raises `ApplicationException`.
- Redaction is applied silently with no message to the user.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

## Sources
- SAIF.Business.Tasks.Claim/clsMyTaskCollection.vb
